<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:24:"themes/admin/themes.html";i:1568365182;}*/ ?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="{CHARSET}">
    <title></title>
    <link rel="stylesheet" href="/themes/admin/assets/css/layui.css">
  </head>
  <body>
    <div style="width:100%;height:auto;background: #FFF">
      <table class="layui-table">
        <thead>
          <tr>
            <th>图标</th>
            <th>作者</th>
            <th>主题名</th>            
            <th>简介</th>
            <th>管理</th>
          </tr> 
        </thead>
        <tbody>
          <?php if(is_array($themeList) || $themeList instanceof \think\Collection || $themeList instanceof \think\Paginator): $i = 0; $__LIST__ = $themeList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
          <tr>
            <td><img style="width:50px;height:50px;" src ='<?php echo $vo['icon']; ?>'/></td>
             <td><?php echo $vo['author']; ?></td>
            <td><?php echo $vo['name']; ?></td>         
            <td><?php echo $vo['intro']; ?></td>
            <td>
              <button onclick="configTheme('<?php echo $vo['identi']; ?>','extend')" class="layui-btn layui-btn-normal">设为手机端主题</button>
              <button onclick="configTheme('<?php echo $vo['identi']; ?>','value')" class="layui-btn layui-btn-danger">设为PC端主题</button>
            </td>
          </tr>
          <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
      </table>
    </div>
    <script src="/themes/admin/assets/layui.js"></script>
    <script src="/themes/admin/assets/jquery-3.2.1.min.js"></script>
    <script>
      layui.use('layer');                    
      function configTheme(identi,type){
        $.ajax({
          url:"<?php echo url('/admin/theme/themes'); ?>",
          data:"type="+type +"&identi=" +identi,
          success:function(e){                 
            layer.msg(e.msg);
          }
        });
      }
    </script>
  </body>
</html>
